<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>检查断言是否为 false</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.assert-options.html">« assert_options</a></li>
      <li style="float: right;"><a href="function.cli-get-process-title.html">cli_get_process_title »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.info.html">PHP 选项/信息 函数</a></li>
    <li>检查断言是否为 false</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.assert" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">assert</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">assert</span> &mdash; <span class="dc-title">检查断言是否为 <strong><code>false</code></strong></span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.assert-description">
  <h3 class="title">说明</h3>
  <p class="para">PHP 5 和 7</p>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>assert</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$assertion</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$description</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>

  <p class="para rdfs-comment">PHP 7</p>
  <div class="methodsynopsis dc-description"><span class="methodname"><strong>assert</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$assertion</code></span>, <span class="methodparam"><span class="type"><a href="class.throwable.html" class="type Throwable">Throwable</a></span> <code class="parameter">$exception</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>assert()</strong></span> 会检查指定的 <code class="parameter">assertion</code>
   并在结果为 <strong><code>false</code></strong> 时采取适当的行动。 
  </p>
  <div class="refsect2 unknown-descriptioo" id="refsect2-function.assert-unknown-descriptioo">
   <h4 class="title">传统断言（PHP 5 和 7）</h4>
   <p class="para">
    如果 <code class="parameter">assertion</code> 是字符串，它将会被 <span class="function"><strong>assert()</strong></span>
    当做 PHP 代码来执行。如果传入了 boolean 的条件作为
    <code class="parameter">assertion</code>，这个条件将不会显示为断言函数的参数；在调用你定义的
    <span class="function"><a href="function.assert-options.html" class="function">assert_options()</a></span> 处理函数时，条件会转换为字符串，而布尔值 <strong><code>false</code></strong>
    会被转换成空字符串。
   </p>
   <p class="para">
    断言这个功能应该只被用来调试。应该用于完整性检查时测试条件是否始终应该为
    <strong><code>true</code></strong>，来指示某些程序错误，或者检查具体功能的存在（类似扩展函数或特定的系统限制和功能）。
   </p>
   <p class="para">
    断言不应该用于普通运行时操作，类似输入参数的检查。作为一个经验法则，在断言禁用时代码也应该能够正确地运行。
   </p>
   <p class="para">
    <span class="function"><strong>assert()</strong></span> 的行为可以通过 <span class="function"><a href="function.assert-options.html" class="function">assert_options()</a></span>
    来配置，或者手册页面上描述的 .ini 设置。
   </p>
   <p class="para">
    <span class="function"><a href="function.assert-options.html" class="function">assert_options()</a></span> 和/或 <strong><code>ASSERT_CALLBACK</code></strong>
    配置指令允许设置回调函数来处理失败的断言。
   </p>
   <p class="para">
    <span class="function"><strong>assert()</strong></span> 回调函数在构建自动测试套件的时候尤其有用，因为它们允许你简易地捕获传入断言的代码，并包含断言的位置信息。
    当信息能够被其他方法捕获，使用断言可以让它更快更方便！
   </p>
   <p class="para">
    回调函数应该接受三个参数。第一个参数包括了断言失败所在的文件。第二个参数包含了断言失败所在的行号，第三个参数包含了失败的表达式（如有任意
    — 字面值例如 1 或者 &quot;two&quot; 将不会传递到这个参数）。PHP 5.4.8 及更高版本的用户也可以提供第四个可选参数，如果设置了，用于将
    <code class="parameter">description</code> 指定到 <span class="function"><strong>assert()</strong></span>。
   </p>
  </div>

  <div class="refsect2 unknown-unknown-descriptiop" id="function.assert.expectations">
   <h4 class="title">Expectations（仅 PHP 7）</h4>
   <p class="para">
    <span class="function"><strong>assert()</strong></span> 是 PHP 7 中的语言结构，允许定义
    expectation：断言在开发和测试环境中生效，经过优化，在生产环境中零成本。
   </p>
   <p class="para">
    出于向后兼容的原因，<span class="function"><a href="function.assert-options.html" class="function">assert_options()</a></span> 仍然可以控制如上所述的行为。但仅限 PHP
    7 的代码应使用两个新的配置指令来控制 <span class="function"><strong>assert()</strong></span> 的行为，而不是调用
    <span class="function"><a href="function.assert-options.html" class="function">assert_options()</a></span>。
   </p>
   <table class="doctable table">
    <caption><strong>
     用于 <span class="function"><strong>assert()</strong></span> 的 PHP 7 控制指令
    </strong></caption>
    
     <thead>
      <tr>
       <th>指令</th>
       <th>默认值</th>
       <th>可能值</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>
        <a href="ini.core.html#ini.zend.assertions" class="link">zend.assertions</a>
       </td>
       <td><code class="literal">1</code></td>
       <td>
        <ul class="simplelist">
         <li class="member">
          <code class="literal">1</code>：生成并执行代码（开发模式）
         </li>
         <li class="member">
          
          <code class="literal">0</code>：生成代码但在运行时跳转
         </li>
         <li class="member">
          <code class="literal">-1</code>：生成代码但在运行时跳转（生产模式）
         </li>
        </ul>
       </td>
      </tr>

      <tr>
       <td>
        <a href="info.configuration.html#ini.assert.exception" class="link">assert.exception</a>
       </td>
       <td><code class="literal">0</code></td>
       <td>
        <ul class="simplelist">
         <li class="member">
          <code class="literal">1</code>：断言失败时抛出，抛出提供给 <code class="parameter">exception</code>
          的对象，或未提供 <code class="parameter">exception</code> 时抛出新的
          <span class="classname"><a href="class.assertionerror.html" class="classname">AssertionError</a></span> 对象
         </li>
         <li class="member">
          <code class="literal">0</code>：如上所述使用/生成
          <span class="classname"><a href="class.throwable.html" class="classname">Throwable</a></span>，但仅仅是基于该对象生成警告而不是抛出（与
          PHP 5 行为兼容）
         </li>
        </ul>
       </td>
      </tr>

     </tbody>
    
   </table>

  </div>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.assert-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">assertion</code></dt>

     <dd>

      <p class="para">
       断言。在 PHP 5 中，不是要求值的 <span class="type">string</span> 就是要测试的 <span class="type">bool</span>。自
       PHP 7 起，可以是任何带返回值的表达式，运行后的结果用于表示断言成功还是失败。
      </p>

      <div class="warning"><strong class="warning">警告</strong>
       <p class="para">
        自 PHP 7.2.0 起<em class="emphasis">弃用</em> <span class="type">string</span> 作为
        <code class="parameter">assertion</code>，自 PHP 8.0.0 起删除。
       </p>
      </div>
     </dd>

    
    
     <dt>
<code class="parameter">description</code></dt>

     <dd>

      <p class="para">
       如果 <code class="parameter">assertion</code> 失败了，选项 description 将会包括在失败信息里。自 PHP 7
       起，如果没有提供 description，默认 description 将会提供调用 <span class="function"><strong>assert()</strong></span> 的源代码。
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">exception</code></dt>

     <dd>

      <p class="para">
       在 PHP 7 中，第二个参数可以是 <span class="classname"><a href="class.throwable.html" class="classname">Throwable</a></span> 对象而不是 descriptive
       <span class="type">string</span>，如果断言失败且启用 <a href="info.configuration.html#ini.assert.exception" class="link">assert.exception</a>
       配置指令，会抛出该对象。
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.assert-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   assertion 是 false 则返回 <strong><code>false</code></strong>，否则是 <strong><code>true</code></strong>。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.assert-changelog">
  <h3 class="title">更新日志</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.0.0</td>
       <td>
         <span class="function"><strong>assert()</strong></span> 将不再对字符串参数求值，而是跟其他参数一样对待。应该使用 <code class="code">assert($a == $b)</code>
         替代 <code class="code">assert(&#039;$a == $b&#039;)</code>。已移除 <code class="literal">assert.quiet_eval</code> <var class="filename">php.ini</var> 指令和
         <strong><code>ASSERT_QUIET_EVAL</code></strong> 常量，因为它们不再有任何作用。
       </td>
      </tr>

      <tr>
       <td>8.0.0</td>
       <td>
        不再允许在命名空间中声明叫做 <code class="literal">assert()</code> 的函数，并发出 <strong><code>E_COMPILE_ERROR</code></strong>。
       </td>
      </tr>

      <tr>
       <td>7.3.0</td>
       <td>
        弃用在命名空间中声明 <code class="literal">assert()</code> 函数。这样声明会发出 <strong><code>E_DEPRECATED</code></strong>。
       </td>
      </tr>

      <tr>
       <td>7.2.0</td>
       <td>
        弃用使用 <span class="type">string</span> 作为 <code class="parameter">assertion</code>。当 <a href="info.configuration.html#ini.assert.active" class="link">assert.active</a>
        和 <a href="ini.core.html#ini.zend.assertions" class="link">zend.assertions</a> 都设为 <code class="literal">1</code> 时，现在会发出
        <strong><code>E_DEPRECATED</code></strong> 通知。
       </td>
      </tr>

      <tr>
       <td>7.0.0</td>
       <td>
        <span class="function"><strong>assert()</strong></span> 现在是语言结构而不是函数。<code class="parameter">assertion</code> 现在可以是表达式。第二个参数现在解释为
        <code class="parameter">exception</code>（如果给出了 <span class="classname"><a href="class.throwable.html" class="classname">Throwable</a></span>），或者解释为自 PHP 5.4.8 开始支持的
        <code class="parameter">description</code>。
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.assert-examples">
  <h3 class="title">范例</h3>
  <div class="refsect2 unknown-examplet" id="refsect2-function.assert-unknown-examplet">
   <h4 class="title">传统断言（PHP 5 和 7）</h4>
   <p class="para">
    <div class="example" id="example-547">
     <p><strong>示例 #1 使用自定义处理程序处理失败的断言</strong></p>
     <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;激活断言，并设置它为&nbsp;quiet<br /></span><span style="color: #0000BB">assert_options</span><span style="color: #007700">(</span><span style="color: #0000BB">ASSERT_ACTIVE</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">assert_options</span><span style="color: #007700">(</span><span style="color: #0000BB">ASSERT_WARNING</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">assert_options</span><span style="color: #007700">(</span><span style="color: #0000BB">ASSERT_QUIET_EVAL</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//创建处理函数<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">my_assert_handler</span><span style="color: #007700">(</span><span style="color: #0000BB">$file</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$line</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$code</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;hr&gt;Assertion&nbsp;Failed:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File&nbsp;'</span><span style="color: #0000BB">$file</span><span style="color: #DD0000">'&lt;br&nbsp;/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Line&nbsp;'</span><span style="color: #0000BB">$line</span><span style="color: #DD0000">'&lt;br&nbsp;/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Code&nbsp;'</span><span style="color: #0000BB">$code</span><span style="color: #DD0000">'&lt;br&nbsp;/&gt;&lt;hr&nbsp;/&gt;"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">//&nbsp;设置回调函数<br /></span><span style="color: #0000BB">assert_options</span><span style="color: #007700">(</span><span style="color: #0000BB">ASSERT_CALLBACK</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'my_assert_handler'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;让一则断言失败<br /></span><span style="color: #0000BB">assert</span><span style="color: #007700">(</span><span style="color: #DD0000">'mysql_query("")'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
     </div>

    </div>
   </p>
   <p class="para">
    <div class="example" id="example-548">
     <p><strong>示例 #2 使用自定义处理器打印描述信息</strong></p>
     <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;激活断言，并设置它为&nbsp;quiet<br /></span><span style="color: #0000BB">assert_options</span><span style="color: #007700">(</span><span style="color: #0000BB">ASSERT_ACTIVE</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">assert_options</span><span style="color: #007700">(</span><span style="color: #0000BB">ASSERT_WARNING</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">assert_options</span><span style="color: #007700">(</span><span style="color: #0000BB">ASSERT_QUIET_EVAL</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;创建处理函数<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">my_assert_handler</span><span style="color: #007700">(</span><span style="color: #0000BB">$file</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$line</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$code</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$desc&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Assertion&nbsp;failed&nbsp;at&nbsp;</span><span style="color: #0000BB">$file</span><span style="color: #DD0000">:</span><span style="color: #0000BB">$line</span><span style="color: #DD0000">:&nbsp;</span><span style="color: #0000BB">$code</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">$desc</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">":&nbsp;</span><span style="color: #0000BB">$desc</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">//&nbsp;设置回调<br /></span><span style="color: #0000BB">assert_options</span><span style="color: #007700">(</span><span style="color: #0000BB">ASSERT_CALLBACK</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'my_assert_handler'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;Make&nbsp;an&nbsp;assertion&nbsp;that&nbsp;should&nbsp;fail<br /></span><span style="color: #0000BB">assert</span><span style="color: #007700">(</span><span style="color: #DD0000">'2&nbsp;&lt;&nbsp;1'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">assert</span><span style="color: #007700">(</span><span style="color: #DD0000">'2&nbsp;&lt;&nbsp;1'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Two&nbsp;is&nbsp;less&nbsp;than&nbsp;one'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
     </div>

     <div class="example-contents"><p>以上例程会输出：</p></div>
     <div class="example-contents screen">
 <div class="cdata"><pre>
 Assertion failed at test.php:21: 2 &lt; 1
 Assertion failed at test.php:22: 2 &lt; 1: Two is less than one
 </pre></div>
     </div>
    </div>
   </p>
  </div>

  <div class="refsect2 unknown-unknown-exampleu" id="refsect2-function.assert-unknown-unknown-exampleu">
   <h4 class="title">Expectations (PHP 7 only)</h4>
   <div class="example" id="example-549">
    <p><strong>示例 #3 不带自定义异常的 Expectations</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />assert</span><span style="color: #007700">(</span><span style="color: #0000BB">true&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #DD0000">'Hi!'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>
     <a href="ini.core.html#ini.zend.assertions" class="link">zend.assertions</a> 设为
     0，以上示例会输出：
    </p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Hi!
</pre></div>
    </div>
    <div class="example-contents"><p>
     <a href="ini.core.html#ini.zend.assertions" class="link">zend.assertions</a> 设为
     1，<a href="info.configuration.html#ini.assert.exception" class="link">assert.exception</a> 设为
     0，以上示例会输出：
    </p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Warning: assert(): assert(true == false) failed in - on line 2
Hi!
</pre></div>
    </div>
    <div class="example-contents"><p>
     <a href="ini.core.html#ini.zend.assertions" class="link">zend.assertions</a> 和
     <a href="info.configuration.html#ini.assert.exception" class="link">assert.exception</a> 都设为 1，以上示例会输出：
    </p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Fatal error: Uncaught AssertionError: assert(true == false) in -:2
Stack trace:
#0 -(2): assert(false, &#039;assert(true == ...&#039;)
#1 {main}
  thrown in - on line 2
</pre></div>
    </div>
   </div>
   <div class="example" id="example-550">
    <p><strong>示例 #4 包含自定义异常的 Expectations</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">class&nbsp;</span><span style="color: #0000BB">CustomError&nbsp;</span><span style="color: #007700">extends&nbsp;</span><span style="color: #0000BB">AssertionError&nbsp;</span><span style="color: #007700">{}<br /><br /></span><span style="color: #0000BB">assert</span><span style="color: #007700">(</span><span style="color: #0000BB">true&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,&nbsp;new&nbsp;</span><span style="color: #0000BB">CustomError</span><span style="color: #007700">(</span><span style="color: #DD0000">'True&nbsp;is&nbsp;not&nbsp;false!'</span><span style="color: #007700">));<br />echo&nbsp;</span><span style="color: #DD0000">'Hi!'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>
     <a href="ini.core.html#ini.zend.assertions" class="link">zend.assertions</a> 设为
     0，以上示例会输出：
    </p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Hi!
</pre></div>
    </div>
    <div class="example-contents"><p>
     <a href="ini.core.html#ini.zend.assertions" class="link">zend.assertions</a> 设为
     1，<a href="info.configuration.html#ini.assert.exception" class="link">assert.exception</a> 设为
     0，以上示例会输出：
    </p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Warning: assert(): CustomError: True is not false! in -:4
Stack trace:
#0 {main} failed in - on line 4
Hi!
</pre></div>
    </div>
    <div class="example-contents"><p>
     <a href="ini.core.html#ini.zend.assertions" class="link">zend.assertions</a> 和
     <a href="info.configuration.html#ini.assert.exception" class="link">assert.exception</a> 都设为 1，以上示例会输出：
    </p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Fatal error: Uncaught CustomError: True is not false! in -:4
Stack trace:
#0 {main}
  thrown in - on line 4
</pre></div>
    </div>
   </div>
  </div>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.assert-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.assert-options.html" class="function" rel="rdfs-seeAlso">assert_options()</a> - 设置/获取断言的各种标志</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>